package cn.admin.controller;

import cn.admin.config.key.RequestKey;
import cn.admin.entity.FeedBack;
import cn.admin.service.FeedBackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Author: 毛苏宇
 * @Description: You can do it!
 * @Date: Create in 22:12 2019/3/23
 */
@Controller
public class FeedBackController {


    @Autowired private FeedBackService feedBackService;


    @RequestMapping("/feedback")
    public String feedBack(HttpServletRequest request){
        List<FeedBack> feedBacks = feedBackService.findFeedBacks();
        request.setAttribute(RequestKey.REQUEST_FEEDBACKS,feedBacks);
        return "/feedback";
    }

}
